<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html>
<head>
<title>System Schedule Job.</title>
</head>
<link rel="stylesheet" href="../../../resources/css/fw-list.css"
	type="text/css">
<script src="../../../script/base.js"></script>
<script src="../../../script/list.js"></script>
<body bgcolor="white">
<f:view>
	<f:loadBundle basename="net.orange.conf.lang.fw" var="msg" />
	<h:inputHidden value="#{job.datas.rowCount}" id="rowCount" />
	<h:form id="listForm">
		<table align="center" width="100%">
			<tr>
				<td><h:panelGrid columns="2" rowClasses="table-text-3"
					style="width:100%;">
					<h:panelGroup>
						<h:outputText value="#{msg.job_code}:" />
						<h:inputText id="sr_code" value="#{job.sr_code}" />

						<h:outputText value="    " />

						<h:outputText value="#{msg.job_name}:" />
						<h:inputText id="sr_name" value="#{job.sr_name}" />
					</h:panelGroup>
					<h:panelGroup style="text-align:right">
						<h:commandButton id="cmdSubmit" value="#{msg.common_summit}"
							onclick="searchInit()" action="#{job.search}"
							styleClass="button-normal" />

						<h:outputText value="    " />
						<h:commandButton id="cmdCancel" type="reset" value="#{msg.common_cancel}"
							styleClass="button-normal" />

						<h:outputText value="    " />
						<h:commandButton id="cmdNew" type="submit" value="#{msg.common_new}"
							action="#{job.create}" styleClass="button-normal" />
					</h:panelGroup>
				</h:panelGrid></td>
			</tr>
			<tr>
				<td>
				<hr>
				</td>
			</tr>
			<tr>
				<td class="content-message"><h:messages /></td>
			</tr>
			<tr>
				<td><h:dataTable id="table" value="#{job.datas}"
					styleClass="listing-table" var="the" rowClasses="table-text"
					headerClass="column-head">
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{msg.job_code}" />
						</f:facet>
						<h:outputText value="#{the.code}" />
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{msg.job_name}" />
						</f:facet>
						<h:outputText value="#{the.name}" />
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="" />
						</f:facet>

						<h:commandButton id="cmdEdit" type="submit" value="#{msg.common_edit}"
							action="#{job.open}" styleClass="button-edit" />

						<h:outputText value=" " />

						<h:commandButton id="cmdCopy" type="submit" value="#{msg.common_copy}"
							action="#{job.copy}" styleClass="button-edit" />

						<h:outputText value=" " />

						<h:commandButton id="cmdDelete" type="submit" value="#{msg.common_delete}"
							action="#{job.delete}" onmousedown="return confirmDelete(this);"
							styleClass="button-delete" />
					</h:column>

				</h:dataTable></td>
			</tr>
			<tr>
				<td><h:panelGrid columns="1" rowClasses="table-text-3"
					style="width:100%;text-align:right">
					<h:panelGroup>
						<h:outputText value="#{msg.common_page}: #{job.pageLabel} " />

						<h:commandLink action="#{job.firstPage}"
							rendered="#{not job.firstPage}">
							<h:outputText value="#{msg.common_firstpage}| " />
						</h:commandLink>

						<h:commandLink action="#{job.previousPage}"
							rendered="#{not job.firstPage}">
							<h:outputText value="#{msg.common_perviouspage}| " />
						</h:commandLink>

						<h:commandLink action="#{job.nextPage}"
							rendered="#{not job.lastPage}">
							<h:outputText value="#{msg.common_nextpage}| " />
						</h:commandLink>

						<h:commandLink action="#{job.lastPage}"
							rendered="#{not job.lastPage}">
							<h:outputText value="#{msg.common_lastpage}" />
						</h:commandLink>
					</h:panelGroup>
				</h:panelGrid></td>
			</tr>
		</table>

	</h:form>
</f:view>
</body>
</html>
